home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 104 / MacAddict_104_2005-04.iso / Software / Internet & Communication / WordPress 1.2.2 freeware.dmg / wordpress / wp-pass.php < prev    next >
Encoding:
PHP Script  |  2004-04-21  |  402 b   |  11 lines

  1. <?php
  2. /*
  3.   This is just a very simple script to set a cookie with a posted password and redirect back from whence the browser came.
  4.   It doesn't need to connect to the DB, or do anything fancy at all. Yum.
  5.   -- Matt
  6. */
  7. require(dirname(__FILE__) . '/wp-config.php');
  8. setcookie('wp-postpass_'.$cookiehash, $_POST['post_password'], time()+60*60*24*30);
  9. header('Location: ' . $_SERVER['HTTP_REFERER']);
  10.  
  11. ?>